package com.dog.basics.admin.controller.mtkj;

import com.dog.basics.bean.vo.admin.mtkj.IndexVo;
import com.dog.basics.common.util.R;
import com.dog.basics.service.mtkj.IMtDeviceHospitalService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 日报月报模块 前端控制器
 * </p>
 *
 * @author wph
 * @since 2020-09-29
 */
@RestController
@RequestMapping("/pc/device/index")
@Api(value = "首页模块", tags = "首页模块")
@AllArgsConstructor
public class MtDeviceIndexController {
    private final IMtDeviceHospitalService mtDeviceHospitalService;

    /**
     * @Description: 首页列表
     * @Param: OrderFromDto
     * @return: IPage<OrderVo>
     * @Author: wph
     * @Date:
     */
    @ApiOperation(value = "首页列表", notes = "pc:index:page")
    @ApiImplicitParam(name ="wheeType" ,value = "设备类型: 0-轮椅 1-平推车 2-陪护床",dataType = "Integer")
    @GetMapping("/page")
    @PreAuthorize("@pms.hasPermission('pc:index:page')")
    public R<IndexVo> page(Integer wheeType) {
        return R.ok(mtDeviceHospitalService.getIndexVo(wheeType));
    }


}
